#ifndef WF_INFOANGLE_H
#define WF_INFOANGLE_H

#include "pf_previewactioninterface.h"
#include "gui_export.h"

/**
 * This action class can handle user events to measure angles.
 *
 */
class GUI_EXPORT WF_InfoAngle : public PF_PreviewActionInterface {
	Q_OBJECT
public:
    /**
     * Action States.
     */
    enum Status {
        SetEntity1,    /**< Setting the 1st entity. */
        SetEntity2     /**< Setting the 2nd entity. */
    };

public:
    WF_InfoAngle(PF_Container& container,
                        PF_GraphicView& graphicView);
    ~WF_InfoAngle() {}

	static QAction* createGUIAction(LX_Define::ActionType /*type*/, QObject* /*parent*/);

    virtual void init(int status=0);
    virtual void trigger();
    virtual void mouseMoveEvent(PF_MouseEvent* e);
    virtual void mouseReleaseEvent(PF_MouseEvent* e);
    virtual void updateMouseButtonHints();
    virtual void updateMouseCursor();
    virtual void updateToolBar();

private:
	PF_Entity* entity1;
	PF_Vector point1;

    PF_Entity* entity2;
	PF_Vector point2;

	PF_Vector intersection;
};

#endif
